package com.biscuit.page.basicservice.conf.handler;

import com.biscuit.page.basicservice.model.context.RequestContext;

/**
 * @author biscuit
 * @createTime 2024/5/18 10:44
 */
public class RequestContextHandler {

    private static final ThreadLocal<RequestContext> LOCAL = new ThreadLocal<>();

    public static void set(RequestContext context) {
        LOCAL.set(context);
    }

    public static RequestContext getContext() {
        return LOCAL.get();
    }

    public static void clear() {
        LOCAL.remove();
    }

}
